package com.mr.security.web.commons.validate.entity;

import lombok.Data;
import lombok.EqualsAndHashCode;

import java.awt.image.BufferedImage;
import java.time.LocalDateTime;

/**
 * Class: ImageCode
 * User (作者):MRui
 * TODO (描述)：图片验证码code
 * Date 2019-01-20 23:31
 */
@Data
@EqualsAndHashCode(callSuper=true)
public class ImageCode extends ValidateCode {

    /** 图片 */
    private BufferedImage image;

    /** 构造函数1 */
    public ImageCode(BufferedImage image, String code, LocalDateTime expireTime){
        super(code,expireTime);
        this.image = image;
    }

    /** 构造函数2 传入的为秒数的时候（需要转换） */
    public ImageCode(BufferedImage image, String code, int expireIn){
        super(code, expireIn);
        this.image = image;
    }
}
